///////////////////////////////////////////////////////////////////////////
// Copyright 2009 Arabic Game Developer Network, All rights reserved
// www.agd-online.com - info@agdn-online.com
//
// File: audio.h
// Description: Audio abstraction interface.
//
///////////////////////////////////////////////////////////////////////////

// This file is part of kvalleyX.
// 
// kvalleyX is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// kvalleyX is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with kvalleyX.  If not, see <http://www.gnu.org/licenses/>.

#ifndef _AUDIO_H
#define _AUDIO_H

namespace CoreLib
{
/////////////////// Audio Interface ///////////////////
enum AudioSoundType
{
	///TODO: remove all specific game sounds
	Sound_Caught,		// Got caught by a monster
	Sound_Dig,			// Digging with an axe
	Sound_Door,			// Exit door opening
	Sound_Fall,			// Falling off a ledge
	Sound_GameOver,		// Game over
	Sound_Gate,			// Gate turning
	Sound_Hit,			// Sword hits a monster
	Sound_Jewel,		// Collected a jewel
	Sound_Map,			// Tune for pyramids map
	Sound_OneUp,		// Increase lives by one
	Sound_Pickup,		// Pickup an axe or a sword
	Sound_RightDoor,	// Entered the correct door to go to next level
	Sound_BGMusic,		// Looping background music
	Sound_Spawn,		// Monster spawning
	Sound_StartGame,	// New game start
	Sound_Throw,		// Throw a sword
	Sound_CollectedAll,	// All jewels got collected
	Sound_Drop,			// Dropped the held collectable
	Sound_Sword,		// Sword is flying
	Sound_Torch,		// Torch has been turned on
	Sound_Pause,		// Tune for pause

	// End of list
	Sound_Count
};

////////////////////////////////////////////////////////////////////
// Class: AudioManager
// Purpose: Central manager for audio services and resources.
//
////////////////////////////////////////////////////////////////////
class AudioManager
{
	public:
		AudioManager();
		virtual ~AudioManager();
		virtual bool init() = 0;
		virtual void play(AudioSoundType eSound) = 0;
		virtual void stop(AudioSoundType eSound) = 0;
		virtual void update() = 0;
		bool bgMusicPlaying(void) const { return m_bBGMPlaying; }
		
// 		static AudioManager* Instance(void) { return m_pInstance; } // Singleton
		
	private:
// 		static AudioManager* m_pInstance;
		bool m_bBGMPlaying;
};

// bool AudioInit(void);
// void AudioShutdown(void);
// void AudioPlay(AudioSoundType eSound);
// void AudioStop(AudioSoundType eSound);
// void AudioUpdate(void);
// bool AudioIsBGMusicPlaying(void);

} // CoreLib namespace
#endif // _AUDIO_H

////////////////// End of File : audio.h //////////////////
